Skip to content

Conversation

@sameerank
Copy link
Contributor

@sameerank sameerank commented Dec 9, 2025

Add setup documentation for using Datadog Feature Flags with Ruby applications. Includes installation, configuration, and usage examples for all flag types.

Not yet in https://github.com/DataDog/dd-trace-rb/releases but will be with 2.23.0

What does this PR do? What is the motivation?

Merge instructions

Merge readiness:

  • Ready for merge

For Datadog employees:

Your branch name MUST follow the <name>/<description> convention and include the forward slash (/). Without this format, your pull request will not pass CI, the GitLab pipeline will not run, and you won't get a branch preview. Getting a branch preview makes it easier for us to check any issues with your PR, such as broken links.

If your branch doesn't follow this format, rename it or create a new branch and PR.

[6/5/2025] Merge queue has been disabled on the documentation repo. If you have write access to the repo, the PR has been reviewed by a Documentation team member, and all of the required checks have passed, you can use the Squash and Merge button to merge the PR. If you don't have write access, or you need help, reach out in the #documentation channel in Slack.

Additional notes

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

Preview links (active after the build_preview check completes)

Modified Files

Before setting up the Ruby Feature Flags SDK, ensure you have:

- **Datadog Agent** with [Remote Configuration][1] enabled
- **Datadog Ruby tracer** `datadog` version 2.23.0 or later
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet published. Assuming this will be in the next minor release https://github.com/DataDog/dd-trace-rb/releases

client = OpenFeature::SDK.build_client
```

The client returns default values until remote configuration loads in the background. This approach keeps your application responsive during startup but may serve defaults for early requests.
Copy link
Contributor Author

@sameerank sameerank Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Provider eventing is not yet supported in OpenFeature: https://github.com/open-feature/ruby-sdk?tab=readme-ov-file#eventing

Eventing is needed for proper separation of non-blocking-vs-blocking between set_provider vs set_provider_and_wait so I'm leaving that out of the docs for now. I'm currently working on a pull request to get OpenFeature's set_provider_and_wait to match the event-based OpenFeature spec and then I can add a section for the blocking version of setting the provider to this doc (which is likely a common use-case)

@sameerank sameerank marked this pull request as ready for review December 9, 2025 22:20
@sameerank sameerank requested a review from a team as a code owner December 9, 2025 22:20
@sameerank sameerank changed the base branch from master to lr/server-sdk-overview-docs December 9, 2025 22:23
@sameerank sameerank requested review from a team as code owners December 9, 2025 22:23
@sameerank sameerank requested a review from calvarjorge December 9, 2025 22:23
@sameerank sameerank marked this pull request as draft December 9, 2025 22:25
@sameerank sameerank removed request for a team and calvarjorge December 9, 2025 22:25
- Port content from setup/ruby.md to server/ruby.md
- Maintain all Vale linting fixes from previous commits
- Include prerequisites, installation, usage examples, and troubleshooting
- Support for boolean, string, number, object flags and evaluation context
@sameerank sameerank force-pushed the sameerank/feature-flags-ruby branch from 44b7ec5 to 955af79 Compare December 9, 2025 22:33
@sameerank
Copy link
Contributor Author

Whoops sorry about the mess above. I had mistakenly started the branch off master 😅

@sameerank sameerank requested a review from joepeeples December 9, 2025 22:37
@sameerank sameerank marked this pull request as ready for review December 9, 2025 22:38

- **Datadog Agent** with [Remote Configuration][1] enabled
- **Datadog Ruby tracer** `datadog` version 2.23.0 or later
- **OpenFeature Ruby SDK** `openfeature-sdk` version 0.4.1 or later
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Co-authored-by: Leo Romanovsky <leo.romanovsky@datadoghq.com>
@sameerank sameerank merged commit d589d53 into lr/server-sdk-overview-docs Dec 10, 2025
14 checks passed
@sameerank sameerank deleted the sameerank/feature-flags-ruby branch December 10, 2025 20:51
leoromanovsky added a commit that referenced this pull request Dec 17, 2025
* add ffe server sdk landing page and stubs for each language

* add to sidebar

* poll

* simpler setup

* rebuild nav structure

also:
- rename `setup` to `client`
- update links, other URL references

* add tile layout for server landing page

+ also renames the tile partial in the client page for consistency

* add go docs for openfeature implementation (#33234)

* add go docs for openfeature implementation

* add docs for blocking init, custom timeout, non blocking

* no agent version

* Documentation for dd-trace with feature flagging support (#33165)

* Documentation for dd-trace with feature flagging support

* Update content/en/feature_flags/setup/nodejs.md

Co-authored-by: Leo Romanovsky <leo.romanovsky@datadoghq.com>

---------

Co-authored-by: Leo Romanovsky <leo.romanovsky@datadoghq.com>

* Add Ruby feature flags documentation (#33233)

* Add Ruby feature flags server documentation

- Port content from setup/ruby.md to server/ruby.md
- Maintain all Vale linting fixes from previous commits
- Include prerequisites, installation, usage examples, and troubleshooting
- Support for boolean, string, number, object flags and evaluation context

* Update content/en/feature_flags/server/ruby.md

Co-authored-by: Leo Romanovsky <leo.romanovsky@datadoghq.com>

---------

Co-authored-by: Leo Romanovsky <leo.romanovsky@datadoghq.com>

* Add python documentation for OpenFeature implementation (#33247)

* consolidate duplicate files

Files were in two different paths (older `setup` path and newer `server` path)

* Add Java Feature Flags Setup Documentation (#33194)

* Add Java Feature Flags setup documentation

- Add comprehensive Java SDK onboarding guide
- Include installation instructions for Maven and Gradle
- Document OpenFeature provider initialization and usage
- Add code examples for all flag types (boolean, string, int, double, object)
- Document error handling and common error codes
- Include best practices and troubleshooting guide
- Add Java to feature flags setup page navigation
- Document integration with Datadog APM and exposure tracking

Related: FFE Server SDK code freeze preparation

* fix(docs): Add missing bootstrap JAR and improve Java Feature Flags documentation

Critical fixes:
- Add missing dd-java-agent-feature-flagging-bootstrap dependency to all examples
- Add Building from Source section with detailed instructions
- Explain bootstrap module purpose (classloader communication)
- Add troubleshooting for ClassNotFoundException

Improvements to match Java APM documentation patterns:
- Add application server configuration tabs (Spring Boot, Tomcat, JBoss, Jetty, Docker)
- Update all code examples to use SLF4J logger instead of System.out/err
- Add Compatibility requirements section
- Add Getting started section
- Update initialization example to show complete application structure

Code quality:
- Use logger.info/warn/error throughout with parameterized messages
- Show proper exception handling with logger
- Match actual implementation in ffe-dogfooding repo
- Include named client usage ("my-app")

The documentation now accurately reflects the required dependencies,
follows established Datadog docs patterns, and provides complete
setup instructions for the development build.

* docs(java): Improve documentation based on review feedback

Changes:
- Add cross-linking to Configuration section from early warning
- Add OpenFeature SDK to compatibility requirements (it is required)
- Remove all local build instructions (only reference published X.X.X versions)
- Add skip guidance for users with existing agent/remote-config setup
- Clarify ProviderNotReadyError is OpenFeature exception (optional handling)
- Update exception handling to be optional based on availability requirements
- Note that not catching exception may prevent application startup

Improvements:
- Users with existing APM can skip to provider initialization
- Users with existing remote-config can skip agent configuration
- Clear guidance on when exception handling is optional vs required
- Removed all references to building from source

* docs(java): Add event state watching and clarify provider instance sharing

Changes:
- Add PROVIDER_ERROR and PROVIDER_STALE event listeners to async init example
- Note that PROVIDER_CONFIGURATION_CHANGED is optional (depends on provider support)
- Update multiple clients section: "organize context and flags" (not just flags)
- Clarify that Provider instance is shared globally (client names are organizational only)

The Provider constructor doesn't take a name parameter - it's a single shared instance.
Named clients are just for organizing your application code, not separate providers.

* docs(java): Align flag keys and attributes with mobile SDK conventions

Changes:
- Update all flag keys to use dot notation (matching Android/iOS):
  * new-checkout-flow -> checkout.new
  * ui-theme -> ui.theme
  * payment-api-endpoint -> payment.api.endpoint
  * max-retries -> retries.max
  * discount-rate -> pricing.discount.rate
  * feature-config -> ui.config
  * All other flags updated to dot notation

- Standardize attribute to use "tier" consistently (not "plan")

- Remove "country" attribute from basic example to match mobile simplicity

This creates consistency across all SDK documentation and makes it easier
for users to migrate between platforms or reference examples.

* fix tile image, add page to side nav

* headings: sentence-case capitalization

* style linter, general style edits

* Add Java Feature Flags setup documentation

- Add comprehensive Java SDK onboarding guide
- Include installation instructions for Maven and Gradle
- Document OpenFeature provider initialization and usage
- Add code examples for all flag types (boolean, string, int, double, object)
- Document error handling and common error codes
- Include best practices and troubleshooting guide
- Add Java to feature flags setup page navigation
- Document integration with Datadog APM and exposure tracking

Related: FFE Server SDK code freeze preparation

* fix(docs): Add missing bootstrap JAR and improve Java Feature Flags documentation

Critical fixes:
- Add missing dd-java-agent-feature-flagging-bootstrap dependency to all examples
- Add Building from Source section with detailed instructions
- Explain bootstrap module purpose (classloader communication)
- Add troubleshooting for ClassNotFoundException

Improvements to match Java APM documentation patterns:
- Add application server configuration tabs (Spring Boot, Tomcat, JBoss, Jetty, Docker)
- Update all code examples to use SLF4J logger instead of System.out/err
- Add Compatibility requirements section
- Add Getting started section
- Update initialization example to show complete application structure

Code quality:
- Use logger.info/warn/error throughout with parameterized messages
- Show proper exception handling with logger
- Match actual implementation in ffe-dogfooding repo
- Include named client usage ("my-app")

The documentation now accurately reflects the required dependencies,
follows established Datadog docs patterns, and provides complete
setup instructions for the development build.

* docs(java): Improve documentation based on review feedback

Changes:
- Add cross-linking to Configuration section from early warning
- Add OpenFeature SDK to compatibility requirements (it is required)
- Remove all local build instructions (only reference published X.X.X versions)
- Add skip guidance for users with existing agent/remote-config setup
- Clarify ProviderNotReadyError is OpenFeature exception (optional handling)
- Update exception handling to be optional based on availability requirements
- Note that not catching exception may prevent application startup

Improvements:
- Users with existing APM can skip to provider initialization
- Users with existing remote-config can skip agent configuration
- Clear guidance on when exception handling is optional vs required
- Removed all references to building from source

* docs(java): Add event state watching and clarify provider instance sharing

Changes:
- Add PROVIDER_ERROR and PROVIDER_STALE event listeners to async init example
- Note that PROVIDER_CONFIGURATION_CHANGED is optional (depends on provider support)
- Update multiple clients section: "organize context and flags" (not just flags)
- Clarify that Provider instance is shared globally (client names are organizational only)

The Provider constructor doesn't take a name parameter - it's a single shared instance.
Named clients are just for organizing your application code, not separate providers.

* docs(java): Align flag keys and attributes with mobile SDK conventions

Changes:
- Update all flag keys to use dot notation (matching Android/iOS):
  * new-checkout-flow -> checkout.new
  * ui-theme -> ui.theme
  * payment-api-endpoint -> payment.api.endpoint
  * max-retries -> retries.max
  * discount-rate -> pricing.discount.rate
  * feature-config -> ui.config
  * All other flags updated to dot notation

- Standardize attribute to use "tier" consistently (not "plan")

- Remove "country" attribute from basic example to match mobile simplicity

This creates consistency across all SDK documentation and makes it easier
for users to migrate between platforms or reference examples.

* docs(java): Move Java Feature Flags docs to server/ directory

- Move java.md from feature_flags/setup/ to feature_flags/setup/server/
- Update frontmatter to reference server-side landing page
- Apply style edits from linter (sentence-case headings, consistent capitalization)

* extra dev info

* various style edits

* section collapsing

* better sections

* reduce expanders

---------

Co-authored-by: Joe Peeples <joe.peeples@datadoghq.com>

* remove Java from client-side tile partial

* Python review edits

also applied to other languages with the same text

* Ruby review edits

and other languages with same text

* Go review edits

and other languages with same text

* Node.js review edits

+ other languages

* clean up links

---------

Co-authored-by: Joe Peeples <joe.peeples@datadoghq.com>
Co-authored-by: Greg Huels <greg.huels@gmail.com>
Co-authored-by: Sameeran Kunche <sameeran.kunche@datadoghq.com>
Co-authored-by: Oleksii Shmalko <oleksii.shmalko@datadoghq.com>
Co-authored-by: Tyler Potter <tyler.potter@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants